package com.changxianggu.cloud.crawler.core.modules.app.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 在线网课
 * </p>
 *
 * @author liuyuantao
 * @since 2021-07-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("cxg_qin_online_course")
public class CxgQinOnlineCourse extends Model<CxgQinOnlineCourse> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("title")
    private String title;

    @TableField("cover")
    private String cover;

    /**
     * 富文本介绍
     */
    @TableField("brief")
    private String brief;

    /**
     * 纯文字简介
     */
    @TableField("brief_short")
    private String briefShort;

    /**
     * 关键字数组,英文逗号分隔
     */
    @TableField("keyword_arr")
    private String keywordArr;
    /**
     * 添加时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 出版社或商户id
     */
    @TableField("press_id")
    private Integer pressId;

    /**
     * 创建的用户名
     */
    @TableField("create_user")
    private String createUser;

    /**
     * 定价
     */
    @TableField("price")
    private BigDecimal price;

    /**
     * 状态(1:正常;0:下架;-1:删除;)
     */
    @TableField("status")
    private Integer status;

    /**
     * 购买用户数
     */
    @TableField("apply_num")
    private Integer applyNum;

    /**
     * 浏览量
     */
    @TableField("view_num")
    private Integer viewNum;

    /**
     * 外链课程的外链地址
     */
    @TableField("link_url")
    private String linkUrl;

    /**
     * 是否外链课程(1:是;0:否;)
     */
    @TableField("is_link")
    private Integer isLink;

    /**
     * 虚拟人数
     */
    @TableField("virtual_num")
    private Integer virtualNum;

    /**
     * 点赞用户数
     */
    @TableField("like_num")
    private Integer likeNum;

    /**
     * 收藏用户数
     */
    @TableField("collect_num")
    private Integer collectNum;

    /**
     * 讲师
     */
    @TableField("lecturer")
    private String lecturer;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
